import {useMemo} from 'react';
import {useParams} from 'react-router-dom';
import {PageMetaConfig} from '../interface';
import { apiUrl } from '../api';

import {WithNormalRender} from '@/biz-components/hoc-form/with-normal';

const AccountDetail = () => {
  const BillFormLayout: any = useMemo(() => {
    return WithNormalRender({});
  }, []);
  const { id } = useParams();
  const detailApi = useMemo(() => {
    return id
        ? {
          remoteUrl: apiUrl.detail,
          method: "POST",
          remoteParams: {
            id,
          },
          pageCode: PageMetaConfig.EDIT,
        }
        : {};
  }, [id]);
  return <BillFormLayout
      anchor
      type="NORMAL"
      {...detailApi}
      formConfigs={{}}
      filedConfig={{}}
      events={{
        handleSaveSubmit: () => {
          console.log('baocunbuttonhook')
        },
      }}
  />
};

export default AccountDetail;
